const fs = require("fs");
const path = require("path");

const path1 = path.join(__dirname, "./node/info.json");
console.log(path1);
const res = JSON.parse(fs.readFileSync(path1));
// console.log(res);
const random = Math.floor(Math.random() * (res.length + 1));
++res[random].count;

const res1 = JSON.stringify(res)
const writer =fs.writeFileSync(path1, res1)
console.log(res[random])